DateRange.inherit("Control");

function DateRange(node){
    this.Control(node);
    
	this.beginDate = this.properties.getObject("beginDate");
	this.endDate = this.properties.getObject("endDate");
}

DateRange.prototype.getBeginDate=function () {
	return this.beginDate;
}

DateRange.prototype.getEndDate=function () {
	return this.endDate;
}

DateRange.prototype.toString=function () {
	var beginDateState=this.beginDate.toString();
	var endDateState=this.endDate.toString();
	if (beginDateState||endDateState){
		return (beginDateState?beginDateState:"?")+" - "+(endDateState?endDateState:"?");
	} else {
		return "";
	}
}

DateRange.prototype.clear=function () {
	this.beginDate.clear();
	this.endDate.clear();
}

DateRange.prototype.getBeginText=function (){
	return this.beginDate.getValue();
}

DateRange.prototype.getEndText=function (){
	return this.endDate.getValue();
}
